home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / CPP / WFC010.ZIP / TEST / TURL.CPP < prev   
Encoding:
C/C++ Source or Header  |  1995-06-28  |  917 b   |  25 lines

  1. #include "test.h"
  2. #pragma hdrstop
  3.  
  4. void test_CUniformResourceLocator( void )
  5. {
  6.    CUniformResourceLocator url( "Serial://COM2:9600,n,8,1/Settings.ini" );
  7.  
  8.    if ( url.ProtocolName == "Serial"      &&  
  9.         url.MachineName  == "COM2"        &&
  10.         url.PortName     == "9600,n,8,1"  &&
  11.         url.PathName     == "Settings.ini" )
  12.    {
  13.       printf( "CUniformResourceLocator passed\n" );
  14.    }
  15.    else
  16.    {
  17.       printf( "CUniformResourceLocator FAILED!\n" );
  18.       printf( "ProtocolName == \"%s\" when it should be \"Serial\"\n",     (LPCTSTR) url.ProtocolName );
  19.       printf( "MachineName  == \"%s\" when it should be \"COM2\"\n",       (LPCTSTR) url.MachineName  );
  20.       printf( "PortName     == \"%s\" when it should be \"9600,n,8,1\n",   (LPCTSTR) url.PortName     );
  21.       printf( "Pathname     == \"%s\" when it should be \"Settings.ini\n", (LPCTSTR) url.PathName     );
  22.    }
  23. }
  24.  
  25.